#ifndef NotebookCtrl_H
#define NotebookCtrl_H

#include "tux.h"

#include <wx/notebook.h>

class NotebookCtrl : public wxNotebook
{
private:
   DECLARE_DYNAMIC_CLASS(NotebookCtrl)
   DECLARE_EVENT_TABLE()
   
protected:

    int dragTabID;
	int rightClickedTabID;
    wxCoord m_X,m_Y;
   
public:
	NotebookCtrl() : dragTabID(-1) {}

	NotebookCtrl(wxWindow *parent,
             wxWindowID id,
             const wxPoint& pos = wxDefaultPosition,
             const wxSize& size = wxDefaultSize,
             long style = 0,
             const wxString& name = wxNotebookNameStr)
             :wxNotebook(parent,id,pos,size,style,name), dragTabID(-1)
    {}

	
	int GetPageIndex(wxWindow* window);

	void OnMouseEvent(wxMouseEvent &event);

	void OnPageClose(wxCommandEvent& event);
	void OnPageCloseAll(wxCommandEvent& event);
	void OnPageCloseOthers(wxCommandEvent& event);

protected: //sub class can override these methods
	virtual void ClosePage(int id);
	virtual void ClosePageAll();
	virtual void ClosePageOthers(int id);
       
}; 
#endif


